<div id="main">
	<div class="hr">
		<hr />
	</div>
	<div id="example">
		<h2><?php 
			require 'conn.php';
			$shopType = trim($_GET['type']);
			switch ($shopType) {
				case 1:
					echo "优惠活动";
				break;
				case 2:
					echo "餐饮娱乐";
				break;
				case 3:
					echo "购物丽人";
				break;
				case 4:
					echo "房屋买卖";
				break;
				case 5:
					echo "购车指南";
				break;
				case 6:
					echo "留学移民";
				break;
				default:
					;
				break;
			}
		
		?></h2>
		<blockquote>
			<p>请认真填写将要添加的店铺信息:</p>
		</blockquote>
		<form id="form1" method="post" action="addImageForShop.php">
			<fieldset>
				<ul>
					<li><label for="lshopname">商家名称:</label> <input id="shopname"
						type="text" name="shopname" value="" />*</li>
					<li><label for="lshoptitle">商家标题:</label> <input id="shoptitle" size="30"
						type="text" name="shoptitle" value="" />*</li>
					<li><label for="lshopaddress">商家地址:</label> <input id="shopaddress"
						type="text" name="shopaddress" value="" />*</li>
					<li><label for="lshopaddress">店铺区域:</label>
						<select name="area">
						<?php 
							$query = "SELECT * FROM area";
							$result = mysql_query($query);
							$num = mysql_num_rows($result);
							for ($j = 0; $j<$num;$j++)
							{
								$row = mysql_fetch_array($result);	
								$area_id = $row['area_id'];
								$area_name = $row['area_name'];
								echo "<option value=".$area_id.">".$area_name."</option>";					
							}
						?>
						</select>
					*</li>
					<li><label for="lshopphone">商家电话:</label> <input id="shopphone"
						type="text" name="shopphone" value="" />*</li>
					<li><label for="lshopemail">商家邮件:</label> <input id="shopemail"
						type="text" name="shopemail" value="" />*</li>
					<li><label for="lshopposition">商家坐标:</label> 纬度:<input size="8"
						id="shoplatitude" type="text" name="shoplatitude" value="" />* 经度:<input
						size="8" id="shoplongitude" type="text" name="shoplongitude"
						value="" />*</li>
					<li><label for="lshopdescription">商家简介:</label><input id="shopdescription" size="60"
						type="text" name="shopdescription" value="" />*</li>
					<li><label for="lshopdescription">商家详情:</label> <textarea
							id="shopdetails" name="shopdetails" rows="10" cols="50"></textarea>
					</li>
					<?php 
							echo "<input name='type' type='hidden' value=$shopType>";
					?>
					<li><input id="inputreset" type="reset" name="inputreset"
						value="重填" /> <input id="inputsubmit" type="submit"
						name="inputsubmit" value="下一步" /></li>
				</ul>

			</fieldset>

		</form>
	</div>
</div>
